#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f;

void solve()
{
	int x1, y1, x2, y2, x3, y3;
	cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
	if (x1 == x2 && x2 == x3 && y1 + y2 + y3 == x1) cout << "yes" << endl;
	else if (y1 == y2 && y2 == y3 && x1 + x2 + x3 == y1) cout << "yes" << endl;
	else if (x2 == x3 && x1 + x2 == y1 && y2 + y3 == y1) cout << "yes" << endl;
	else if (y2 == y3 && y1 + y2 == x1 && x2 + x3 == x1) cout << "yes" << endl;
	else cout << "no" << endl;
}

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int _ = 1;
	cin >> _;
	while (_--)
	{
		solve();
	}
	return 0;
}